<template>
	<view class="content">
		<text style="font-size: 1.5rem; font-weight: bold;">子组件A</text>
		<view class="coma_box" style="display: flex;">
			<text>父组件传进来的值:</text>
			<text style="font-weight:bold;color: red;">{{intent}}</text>
		</view>
		<button type="primary" @click="sendData()">传值给CompB组件</button>
	</view>
</template>

<script>
	export default {
		name:"comA",
		props: ['intent'],
		data() {
			return {
				
			};
		},
		methods:{
			sendData(){
				console.warn("--CompA--sendData-->" + this.intent);
				
				uni.$emit('getIntent', this.intent)
			}
		}
	}
</script>

<style>

</style>